<template>
  <div id="app">
    <div v-if="$route.meta.keepAlive">
      <keep-alive>
        <router-view/>
      </keep-alive>
    </div>
    <div v-if="!$route.meta.keepAlive">
        <router-view/>
    </div>
    <van-tabbar v-if="$route.meta.isIndex" route>
      <van-tabbar-item
        replace
        to="/"
        icon="home-o"
      >首页</van-tabbar-item>
      <van-tabbar-item
        replace
        to="/shop"
        icon="shop-o"
      >店铺</van-tabbar-item>
      <van-tabbar-item
        replace
        to="/cart"
        icon="shopping-cart-o"
      >购物车</van-tabbar-item>
      <van-tabbar-item
        replace
        to="/user"
        icon="user-o"
      >个人</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  name: 'App'
}
</script>

<style>
@import "./assets/css/custom.scss";
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
body{
  background: #fff;
}
</style>
